package com.itheima.health.job;

import com.itheima.health.service.OrderSettingService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@JobHandler(value = "heima.order.clean.orderSetting.job")
@Component
public class CleanTwoYearsHistoryOrderSettingData extends IJobHandler {
    @Autowired
    private OrderSettingService orderSettingService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        System.out.println("----任务调度启动----");
        orderSettingService.clearTwoYearsHistoryOrderSettingData();//  清理垃圾图片
        return SUCCESS;
    }
}
